package com.ld.control.business.process.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 任务流程实例
 * </p>
 *
 * @author wangfeng
 * @since 2024-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("process_example")
@Schema(description = "ProcessExampleModel对象")
public class ProcessExampleModel implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "任务实例id")
    private Long taskExampleId;

    @Schema(description = "子任务实例id")
    private Long subTaskExampleId;

    @Schema(description = "流程模板名称")
    private String name;

    @Schema(description = "流程模板类型：0普通流程，1:初始化流程，2结束流程")
    private Integer type;

    @Schema(description = "任务流程开始时间")
    private Date startTime;

    @Schema(description = "任务流程结束时间")
    private Date endTime;

    @Schema(description = "状态，请看代码枚举")
    private Integer status;

    @Schema(description = "序列号，按照从小到大的顺序执行流程")
    private Integer serialNumber;

    @Schema(description = "创建人id")
    private Long createBy;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新人")
    private Long updateBy;

    @Schema(description = "更新时间")
    private Date updateTime;


    public static final String ID = "id";

    public static final String TASK_EXAMPLE_ID = "task_example_id";

    public static final String SUB_TASK_EXAMPLE_ID = "sub_task_example_id";

    public static final String NAME = "name";

    public static final String TYPE = "type";

    public static final String START_TIME = "start_time";

    public static final String END_TIME = "end_time";

    public static final String STATUS = "status";

    public static final String SERIAL_NUMBER = "serial_number";

    public static final String CREATE_BY = "create_by";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_BY = "update_by";

    public static final String UPDATE_TIME = "update_time";

}
